package dfbz.homework9;

public class MyThread implements Runnable{
    @Override
    public void run() {
        Integer name = Integer.parseInt(Thread.currentThread().getName());
        while (true){
            int sum=1;
            for (Integer i = 1; i <=name; i++) {
                sum*=i;
            }
            System.out.println(name+"的阶乘结果为:"+sum);
            break;
        }
    }
}
